package org.locker.domain.bo;

import org.locker.domain.User;
import org.locker.common.mybatis.core.domain.BaseEntity;
import org.locker.common.core.validate.*;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 用户业务对象 lk_user
 *
 * @author winnie
 * @date 2023-10-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = User.class, reverseConvertGenerate = false)
public class UserBo extends BaseEntity {

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 用户编号
     */
    @NotBlank(message = "用户编号不能为空", groups = {AddGroup.class})
    private String userNo;

    /**
     * 昵称
     */
    @NotBlank(message = "昵称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String nickname;

    /**
     * 手机号码
     */
    @NotBlank(message = "手机号码不能为空", groups = { AddGroup.class})
    private String phone;

    /**
     * openID
     */
    @NotBlank(message = "openID不能为空", groups = { AddGroup.class})
    private String openId;

    /**
     * 头像地址
     */
    @NotBlank(message = "头像地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String iconUrl;

    /**
     * 真实姓名
     */
    @NotBlank(message = "真实姓名不能为空", groups = { AddGroup.class})
    private String realName;

    /**
     * 身份证号
     */
    @NotBlank(message = "身份证号不能为空", groups = { AddGroup.class})
    private String cardNo;

    /**
     * 用户余额
     */
    @NotNull(message = "用户余额不能为空", groups = { AddGroup.class})
    private BigDecimal balanceAmount;

    /**
     * 冻结余额
     */
    @NotNull(message = "冻结余额不能为空", groups = { AddGroup.class})
    private BigDecimal freezeAmount;

    /**
     * 提现金额
     */
    @NotNull(message = "提现金额不能为空", groups = { AddGroup.class})
    private BigDecimal withdrawAmount;

    /**
     * 描述
     */
    @NotBlank(message = "描述不能为空", groups = { AddGroup.class})
    private String describe;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class})
    private String remark;


    /**
     * 最新的一笔订单编号
     */
    private String latestOrderNo;

}
